package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

/**
 * @ClassName ReceiveMtypeEnum
 * @Description: ReceiveMtypeEnum
 * @Author ck
 * @Date 2021/11/22
 * @Version V1.0
 **/
@Getter
public enum ReceiveMtypeEnum {
    PT_VIP(0, "普通会员"),
    TY_VIP(1, "体验VIP"),
    ZS_VIP(2, "钻石VIP"),
    YZ_VIP(3, "银钻VIP"),
    JZVIP_MTYPE(4, "金钻VIP"),
    JZVIPHN_MTYPE(5, "金钻VIP兼职红娘"),
    PTHN_MTYPE(6, "普通红娘"),
    TPHN_MTYPE(7, "铜牌红娘"),
    YPHN_MTYPE(8, "银牌红娘"),
    JPHN_MTYPE(9, "金牌红娘"),
    LOVETUTOR_MTYPE(10, "爱情导师"),
    ;

    private int code;

    private String desc;

    ReceiveMtypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ReceiveMtypeEnum getDscByType(int type) {
        for (ReceiveMtypeEnum p : values()) {
            if (p.getCode() == type) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
